//
//  registerText.m
//  KYProject
//
//  Created by Mxxx on 2016/12/21.
//  Copyright © 2016年 Roman. All rights reserved.
//

#import "registerText.h"

@implementation registerText

- (instancetype)init

{
    self = [super init];
    if (self) {
        UIImageView *imageView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"product_img_icon_xieyi.png"]];
        self.leftView = imageView;
        self.leftViewMode = UITextFieldViewModeAlways;
    }
    return self;
}
//图片与边框的距离
- (CGRect)leftViewRectForBounds:(CGRect)bounds
{
    CGRect iconRect = [super leftViewRectForBounds:bounds];
    iconRect.origin.x += 15;
    return iconRect;
}

//文字与输入框的距离
- (CGRect)textRectForBounds:(CGRect)bounds
{
    
    return CGRectInset(bounds, 45, 0);
}

- (CGRect)editingRectForBounds:(CGRect)bounds
{
    
    return  CGRectInset(bounds, 45, 0);
}

@end
